import {zhuge, mixins} from 'zg-sdk-uniapp'
import App from './App'

// #ifdef MP-UNIONPAY
import VueCupUi from 'vue-cup-ui';
import 'vue-cup-ui/lib/vue-cup-ui.css';
Vue.use(VueCupUi);
// #endif

// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
import {checkLogin, checkAuth} from './utils/check.js'
import {checkLogin_helper, checkAuth_helper} from './utils/check_helper.js'
import { http } from './utils/commonRequest.js';
Vue.use(uView);
Vue.mixin(mixins);
Vue.prototype.$checkLogin = checkLogin;
Vue.prototype.$checkAuth = checkAuth;
Vue.prototype.$checkLogin_helper = checkLogin_helper;
Vue.prototype.$checkAuth_helper = checkAuth_helper;
Vue.prototype.$http = http;
Vue.prototype.$onLaunched = new Promise(resolve => {
    Vue.prototype.$isResolve = resolve
})
Vue.config.productionTip = false;
Vue.prototype.$zhuge = zhuge;
zhuge.load('9a2ce9294fe04960a7e0a3180e959fb7', {
// load配置参数，具体见下方
	debug: false, // 开启实时调试
	pv: false, // 是否自动上报pv/是否启用页面访问统计功能
	did: '', // 自定义设备id，默认首次加载sdk时，sdk会自动为当前设备生成唯一的did（uuid）
	serverUrl: { // 事件上报地址。使用的上报地址，应在微信开发设置中，注册为合法域名
		// normal: 'https://u.zhugeapi.net', // 主地址
		// bac: 'https://ubak.zhugeio.com' ,// 备用地址
		normal: 'https://aw.zjmtbank.com:30003',
	},
})
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif